package com.sangfor.consumer.controller;

import com.sangfor.consumer.entity.Depart;
import com.sangfor.consumer.service.DepartService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author 朱勇军
 * @date 2020/7/25
 */
@RequestMapping("/consumer/depart")
@RestController
public class DepartController {

    @Resource
    private DepartService departService;

    @GetMapping("/get/{id}")
    public Depart getId(@PathVariable("id") Integer id){
        return departService.getById(id);
    }
}
